@extends('master')

@section('title', '职位管理')

@section('content')
<div class="row">
	<div class="col-md-12">
		@include('message')
		<p class="lead">
			编辑职位
		</p>
	</div>
</div>
<div class="row">
	<% Form::model($job, array('route' => array('admin.jobs.update', $job->id), 'method' => 'PUT')) %>
	<div class="col-md-9">
		<div class="form-group">
			<% Form::text('job_name', $job->name, array('class' => 'form-control input-lg', 'placeholder' => '职位名称')) %>
			<%$errors->first('job_name', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
		</div>
		<div class="form-group">
			<% Form::textarea('content', $job->description, array('class' => 'form-control')) %>
			<% $errors->first('content', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
		</div>
	</div>
	<div class="col-md-3">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					更新
				</h3>
			</div>
			<div class="panel-body">
				<div class="form-group">
					<label for="post_status" class="control-label">职位状态</label>
					<% Form::select('job_status', array('0' =>'草稿', '1' => '发布'), $job->status, array('class' => 'form-control')) %>
					<% $errors->first('job_status', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
				</div>
				<button class="btn btn-info btn-md pull-right">更新</button>
			</div>
		</div>
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">
					分类
				</h3>
			</div>
			<div class="panel-body">
				<div class="form-group">
					<% Form::select('job_category',$jobs_category , $job->category_id, array('class' => 'form-control')) %>
					<%$errors->first('categories', '<p class="help-block"><span class="text-danger">:message</span></p>');%>
				</div>
				<% link_to_route('admin.category.index','+ 添加新分类目录')%>
			</div>
		</div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    职位要求
                </h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label>招聘类型</label>
                    <% Form::text('job_type', $job->type, array('class' => 'form-control', 'placeholder' => '招聘类型')) %>
                </div>
                <div class="form-group">
                    <label>招聘部门</label>
                    <% Form::text('job_department', $job->department, array('class' => 'form-control', 'placeholder' => '招聘部门')) %>
                </div>
                <div class="form-group">
                    <label>有效期限</label>
                    <% Form::text('job_valid_date', $job->valid_data, array('class' => 'form-control', 'placeholder' => '有效期限')) %>
                </div>
                <div class="form-group">
                    <label>招聘人数</label>
                    <% Form::text('job_number', $job->number, array('class' => 'form-control', 'placeholder' => '招聘人数')) %>
                </div>
                <div class="form-group">
                    <label>工作经验</label>
                    <% Form::text('job_experience', $job->experience, array('class' => 'form-control', 'placeholder' => '工作经验')) %>
                </div>
                <div class="form-group">
                    <label>所学专业</label>
                    <% Form::text('job_specialty', $job->specialty, array('class' => 'form-control', 'placeholder' => '所学专业')) %>
                </div>
                <div class="form-group">
                    <label>学历要求</label>
                    <% Form::text('job_education', $job->education, array('class' => 'form-control', 'placeholder' => '学历要求')) %>
                </div>
                <div class="form-group">
                    <label>年龄要求</label>
                    <% Form::text('job_age', $job->age, array('class' => 'form-control', 'placeholder' => '年龄要求')) %>
                </div>
            </div>
        </div>
	</div>
</div>

@stop